/*
 * Copyright (c) 2007 Compl Yue Still, All Rights Reserved.
 */

package hbi.task;

import hbi.domain.DomainController;
import hbi.domain.Gateway;

/**
 * Application class implements this interface with the <b>HOW</b> business
 * logics, that is <b>how</b> to accomplish business tasks in its domain.
 * Whereas <b>WHAT</b> to do is told by an {@link TaskScript} from an
 * originating domain.
 * <p>
 * Implementation classes are required to have a no-arg constructor with
 * {@code public} or {@code protected} access.
 * 
 * @author Compl
 * 
 * @param <T>
 *            type of the target domain in which this agent will perform its
 *            task.
 * 
 * @param <O>
 *            type of the originating domain from which this agent is sent out.
 */
public interface TaskAgent<T extends DomainController, O extends DomainController>
{

    void arrived(Gateway<? extends T, ? extends O> gateway);

    void finishTask(Gateway<? extends T, ? extends O> gateway);

}
